package PTA_JAVA.JavaA.Javademo10;

import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
            //输入
            int n=Integer.parseInt(sc.nextLine());
            //创建二维数组
            String[][] s=new String[n][n];
            //打印并存入二维数组
            for(int i=1;i<=n;i++){
                for(int j=1;j<=i;j++){
                    if(j==i){
                        System.out.printf("%d*%d=%d",i,j,i*j);
                    }else{
                        System.out.printf("%d*%d=%-3d",i,j,i*j);
                    }
                    s[i-1][j-1]=String.valueOf(i+"*"+j+"="+i*j);
                }
                System.out.println();
            }
            System.out.println(Arrays.deepToString(s).replace(", null",""));
        }
    }
}
